#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

constexpr int mod = 998244353;
//constexpr int mod = 1e9 + 7;

int reduce(int x) {
	if(x < 0) x += mod;
	if(x >= mod) x -= mod;
	return x;
}

template < typename T > T qp(T x, ll t) { T res = 1; for(; t; t >>= 1, x *= x) if(t & 1) res *= x; return res; }

struct Z { // modint
	int x;
	Z(int x = 0) : x(reduce(x)) {}
	Z(ll x) : x(reduce(x % mod)) {}
	Z operator -() const { return Z(reduce(mod - x)); }
	int val() const { return x; }
	Z inv() const { assert(x); return qp(*this, mod - 2); }
	Z &operator += (const Z &t) { x = reduce(x + t.x); return *this; }
	Z &operator -= (const Z &t) { x = reduce(x - t.x); return *this; }
	Z &operator *= (const Z &t) { x = (ll)x * t.x % mod; return *this; }
	Z &operator /= (const Z &t) { return *this *= t.inv(); }
	friend Z operator + (const Z &a, const Z &b) { Z res = a; res += b; return res; }
	friend Z operator - (const Z &a, const Z &b) { Z res = a; res -= b; return res; }
	friend Z operator * (const Z &a, const Z &b) { Z res = a; res *= b; return res; }
	friend Z operator / (const Z &a, const Z &b) { Z res = a; res /= b; return res; }
	friend ostream & operator << (ostream &out, const Z &x) {
		out << x.val();
		return out;
	}
};

const int N = 110;

Z dp[N][N][1 << 10], fac[N];
int n, X;

int main() {
#ifdef YJR_2333_TEST
	freopen("1.in", "r", stdin);
#endif
	n = in; fac[0] = 1; rep(i, 1, n) fac[i] = fac[i - 1] * i;
	dp[0][0][0] = 1; X = in - 1; int U = 1 << (X * 2 + 1);
	Z ans = 0;
	cerr << U << endl;
	rep(i, 1, n) rep(j, 0, i - 1) rep(t, 0, U - 1) if(dp[i - 1][j][t].val()) {
		//cerr << i - 1 << " " << j << " " << t << " " << dp[i - 1][j][t] << endl;
		dp[i][j][t >> 1] += dp[i - 1][j][t];
		rep(p, max(1, i - X), min(n, i + X)) if(!(t >> (p - i + X) & 1)) {
			//cerr << "!" << ((t >> 1) | 1 << (p - i + X)) << endl;
			dp[i][j + 1][(t | 1 << (p - i + X)) >> 1] += dp[i - 1][j][t];
		}
	}
	rep(j, 0, n) rep(t, 0, U - 1) {
		//if(dp[n][j][t].val()) cerr << dp[n][j][t] << endl;
		if(j & 1) ans -= dp[n][j][t] * fac[n - j];
		else ans += dp[n][j][t] * fac[n - j];
	}
	cout << ans << endl;
	return 0;
}
